﻿using Architecture.Repository.Interface;
using Architeture.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Repository.Impl
{
    public class Menurepsitory : BaseRepository<MenuInfo>, MenuIrepsitory
    {
        public Menurepsitory(EFCoreContext context) : base(context)
        {
        }

        public async Task<MenuInfo> GetMenuByid(int id)
        {
            return await base.GetModelAsync(id);
        }

        public async Task<dynamic> GetMenuInfo()
        {
            return await base.GetAllAsync();
        }

        public async Task<int> MenuAdd(MenuInfo menuInfo)
        {
            return await base.AddAsync(menuInfo);
        }

        public async Task<int> MenuDelete(MenuInfo menuInfo)
        {
            return await base.Update(menuInfo);
        }

        public  Task<int> MenuInfoDel(int id)
        {
            return  base.Delete(id);
        }
    }
}
